class Position < ActiveRecord::Base
	include AliasingColumns
        
        set_table_name "POSITIONS"
	AliasingColumns.add_aliases columns
	
	has_many :users,
			 :class_name => "User",
			 :foreign_key => "position_id"

	
	if  AliasingColumns.get_adapter_name == "oracle"
#		self.primary_key ="ID"	
		set_sequence_name table_name()<<"_SEQ" 
	#	before_create :set_id
		def set_id
			 self.ID =connection.next_sequence_value(self.class.sequence_name)	
		end 
	end


	def self.get_student_id
		Position.find_by_name("Student").id
	end
end
